Skip to content

feat(rc-bucket)!: implement verified bucket creation options - #284

Merged
cxymds merged 7 commits into
mainfrom
cxymds/issue-1406-mb-options
Jul 22, 2026
Merged

feat(rc-bucket)!: implement verified bucket creation options#284
cxymds merged 7 commits into
mainfrom
cxymds/issue-1406-mb-options

Conversation

@cxymds

@cxymds cxymds commented Jul 21, 2026

Copy link
Copy Markdown
Member

Related issue

  • Closes rustfs/backlog#1406.
  • Parent roadmap: rustfs/backlog#1361.

Background and user impact

rc mb advertised --region, --with-versioning, and --with-lock but rejected them at runtime. RustFS supports a region-bearing CreateBucket request, creation-time Object Lock, bucket versioning, and the read APIs needed to verify effective state.

Object Lock cannot be enabled retroactively. RustFS also reports a service-level bucket location, so the CLI must report observed state without claiming a per-bucket region that the server did not persist.

Solution

  • Add typed CreateBucketOptions with a safe option-free default.
  • Normalize --with-lock to effective versioning and validate option invariants before network access.
  • Send region configuration only when explicitly requested and the Object Lock header only during creation.
  • Enable versioning after creation for non-lock versioning requests.
  • Verify effective versioning, Object Lock, and service-reported location.
  • Reconcile -p safely for existing buckets without pretending Object Lock can be enabled later.
  • Preserve completed and failed stages; never delete a successfully created bucket as rollback.
  • Add output-v3 bucket_operations success, empty, partial, and error contracts.
  • Preserve all current versioning, Object Lock, mirror, transfer, watch, ops, and replication behavior.

Validation

  • cargo fmt --all --check
  • cargo clippy --workspace -- -D warnings
  • cargo test --workspace
  • Focused CreateBucket, mb, output-v3, help, Object Lock, versioning, and mirror-planner tests
  • Conflict-marker and staged/unstaged diff checks

All checks pass with zero failures. Focused results include mb 16/16 in both lib and bin, output-v3 12/12, Object Lock 17/17, versioned objects 10/10, and mirror planner 5/5.

BREAKING process

BREAKING: this updates the protected rc command-reference contract and migrates legacy mb JSON to the output-v3 bucket_operations envelope. Output v1 and v2, exit-code definitions, and local configuration schemas are unchanged.

@cxymds
cxymds changed the base branch from cxymds/issue-1367-worm to main July 21, 2026 15:52
@cxymds cxymds closed this Jul 21, 2026
@cxymds cxymds reopened this Jul 21, 2026
@cxymds
cxymds changed the base branch from main to cxymds/issue-1367-worm July 21, 2026 15:52
@cxymds

cxymds commented Jul 21, 2026

Copy link
Copy Markdown
Member Author

Validation is complete for exact head 39c11ab46ccf5c462638484853e64a4022d8bb78.

Local gates:

  • cargo fmt --all --check
  • cargo clippy --workspace -- -D warnings
  • cargo test --workspace

Remote gates:

The PR is open as a draft and its true stacked base is restored to cxymds/issue-1367-worm. The protected command-reference change is declared as BREAKING in the PR description.

A local live beta.10 container run was not performed because the Docker daemon is unavailable in this workspace; the validation claim is limited to the completed local suites and GitHub checks above.

Base automatically changed from cxymds/issue-1367-worm to main July 22, 2026 16:09
@cxymds
cxymds requested a review from overtrue July 22, 2026 16:19
@cxymds
cxymds marked this pull request as ready for review July 22, 2026 16:19
@cxymds

cxymds commented Jul 22, 2026

Copy link
Copy Markdown
Member Author

The stack is now collapsed onto current main after #276 merged. The final standalone delta is limited to verified bucket creation options and bucket_operations output. Full workspace gates and the Object Lock/versioning/mirror regressions pass at head 41f17b3. Please review the current diff.

@cxymds
cxymds merged commit 4572c24 into main Jul 22, 2026
17 checks passed
@cxymds
cxymds deleted the cxymds/issue-1406-mb-options branch July 22, 2026 16:26
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant